<template>
	<view class="new-users copy-data">
		<view class="mid" style="flex:1;overflow: hidden;">
			<view class="head pad30">
				<view class="user-card">
					<view class="user-info">




					</view>
				</view>
				<view class="logo">
					<image src="/static/img/logo.jpg" mode="widthFix" class="logoImg"></image>
				</view>
			</view>


		</view>
		<view class="dowmBtn" style="width: 150px">
			<u-button type="primary" size="default" @click="downApp">{{$t('Download.app')}}</u-button>
		</view>
	</view>
</template>
<script>
	import {
		downApp
	} from '@/api/new.js';

	export default {

		data() {
			return {
				user: {},
				qrcodeData: '',
				show: false,
				qrcodeSize: 300,
				shareShow: false,
				shareUrl: '',
				isShow: true, // 控制一号画布是否隐藏
				qrcode11: this.$t('MyCode') + "ABCDEFGHIJKL",
				url: "",
				showCanvas: false,


			}
		},
		onLoad() {
			// uni.setNavigationBarTitle({
			// 	title: this.$t("user.invite-friends")
			// })
			let that = this

		},

		mounted() {


		},
		methods: {
			downApp() {


				downApp().then(res => {
					console.log(res);
					if (res.code == 200) {
						let link = res.message
						console.log(link);
						uni.downloadFile({
							url: link,
							success(res) {
							console.log(res,'res');



		
							}
						}).catch(err=>{
							console.log(err);
						})
					}


				})
			},
		}

	}
</script>

<style lang="scss" scoped>
	page,
	body {
		height: 100%;
	}

	.logo {
		height: 120px;
		width: 120px;
		margin: 50px auto;
		display: flex;
		align-items: center;

		.logoImg {
			border-radius: 12px;
		}
	}

	.dowmBtn {
		margin: 50px auto;
		display: flex;
		align-items: center;
	}

	.nav {
		padding-bottom: 26rpx;
		background: #fff;
		opacity: 1;
		border-radius: 14rpx;
		width: 100%;
		margin-bottom: 30rpx;

		.item {
			display: flex;
			flex-direction: column;
			align-items: center;
			justify-content: center;
			width: 20%;
			margin-top: 30rpx;

			image {
				width: 82rpx;
				height: 82rpx;
			}
		}
	}

	.bg {
		position: absolute;
		left: 0;
		top: 0;
		width: 100%;
		height: 420rpx;
		background-image: url('~@/static/images/user_bg.png');
		background-repeat: no-repeat;
		background-size: 100% 100%;
	}


	.head {
		// margin:0 10px;
		background: linear-gradient(360deg, rgba(255, 121, 49, 0) 0%, rgba(248, 74, 29, 0.82) 39%, #E93323 100%);
		padding: 25px 10rpx 0px;

		.user-card {
			position: relative;
			// width: 100%;

			margin: 0 auto;




		}

		.num-wrapper {
			z-index: 30;
			position: relative;
			display: flex;
			align-items: center;
			justify-content: space-between;
			margin-top: 20;
			color: #fff;
			// background: rgba(248, 74, 29, 0.82) ;
			background-image: url('~@/static/images/user_bg.png');
			background-repeat: no-repeat;
			background-size: 100% 150%;

		}
	}
</style>